<template>
  <div class="app-header-sticky" :class="{show:y>=88}">
    <div class="container" v-show="y>=88">
      <RouterLink class="logo" to="/" />
      <app-header-nav/>
      <div class="right">
        <RouterLink to="/" >品牌</RouterLink>
        <RouterLink to="/" >专题</RouterLink>
      </div>
    </div>
  </div>
</template>

<script setup>

import AppHeaderNav from "@/components/app-header-nav.vue";
import {useWindowScroll} from "@vueuse/core";
const {  y } = useWindowScroll()
</script>

<style scoped lang="less">
.app-header-sticky {
  opacity: 0;
  transform: translateY(-100%);
  width: 100%;
  height: 134px;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 999;
  background-color: #fff;
  border-bottom: 1px solid #e4e4e4;
  &.show{
    transition: all .3s linear;
    transform: none;
    opacity: 1;
  }
  .container {
    display: flex;
    align-items: center;
  }
  .logo {
    width: 200px;
    height: 132px;
    background: url(../assets/images/logo.svg) no-repeat  center/130%;
  }
  .right {
    width: 220px;
    display: flex;
    text-align: center;
    padding-left: 40px;
    border-left: 2px solid @xtxColor;
    a {
      width: 38px;
      margin-right: 40px;
      font-size: 16px;
      line-height: 1;
      &:hover {
        color: @xtxColor;
      }
    }
  }
}
</style>